/**
 初始化 公司信息

 **/

(function (vc) {
    vc.extends({
        data: {
            companyReadmeInfo: {
                acceptTerms:false,
                content:''
            }
        },
        _initMethod: function () {
            $that._loadReadmeText();

        },
        _initEvent: function () {

        },
        watch: {
            companyReadmeInfo: {
                deep: true,
                handler: function () {
                    vc.emit('company','notifyCompanyReadme',$that.companyReadmeInfo);
                }
            }
        },
        methods: {
            _loadReadmeText:function(){
                let param = {
                    params: {
                        page: 1,
                        row: 1,
                    }
                };
                //发送get请求
                vc.http.apiGet('/system.listRegisterProtocol',
                    param,
                    function (json, res) {
                        let _protocol = JSON.parse(json);
                        $that.companyReadmeInfo.content = _protocol.data[0].merchantProtocol;
                    }, function (errInfo, error) {
                        console.log('请求失败处理');
                    }
                );
            }
        }

    });

})(window.vc);

